<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>ES10对象扩展方法Object.fromEntrties</title>
	</head>
	<body>
		<script>
			const result = Object.fromEntries([
				['name','hangzhou'],
				['area','西湖,拱墅,上城,临平,萧山,余杭']
			]);
			console.log(result);
			const m = new Map();
			m.set('m','wweewq');
			const rs = Object.fromEntries(m);
			console.log(rs);
			// trimStart清除左侧空格 trimEnd 清除字符串右侧空格
			const str = '   rrrsdds     ';
			console.log(str);
			console.log(str.trimStart());
			console.log(str.trimEnd());
			// flat 与 flatMap
			const ar = [1,2,3,[4,5,6,7,[8,9]]];
			console.log(ar.flat(2).flatMap(item => item * 10));
			// Symbol.prototype.description
			let s = Symbol('HANGZHOU');
			console.log(s.description);
			</script>
	</body>
</html>